﻿<UserControl x:Class="CredentialsManager.Views.UpdateUserView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             Height="125" Width="300">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0">
            <Label>User Name:</Label>
            <TextBox IsEnabled="{Binding IsUserNameEditable}" Text="{Binding UserName, UpdateSourceTrigger=PropertyChanged}" TabIndex="0" />
            <Label>Email:</Label>
            <TextBox Text="{Binding Email, UpdateSourceTrigger=PropertyChanged}" TabIndex="3" />
        </StackPanel>
        <StackPanel Grid.Row="0" Grid.Column="1" Margin="10">
            <CheckBox Content="Active User" IsChecked="{Binding IsApproved}" Margin="0, 0, 0, 10" />
            <CheckBox Content="Locked out" IsChecked="{Binding IsLockedOut}" />
            <Button 
                Content="Update User" 
                Command="{Binding UpdateCommand}" 
                Margin="0, 10, 50, 10" 
                IsDefault="True" />
            <Button
                Content="Close"
                IsCancel="True"
                Margin="0, 0, 50, 10" 
                Command="{Binding CloseCommand}" />
        </StackPanel>
    </Grid>
</UserControl>
